<?php require_once 'header.php';?>    
<!-- DataTables Responsive CSS -->
    <link href="sb2/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet">
        <!-- Page Content -->
        <div id="page-wrapper">
            <div class="container-fluid">
                <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <?php echo XXF_LNAME?> 
							<select id="pid" onchange="search()">
								<option value="-1">请选择你要查询的班级</option>
								<?php 
								foreach($pxb as $row){
									?>
									<option value="<?php echo $row['id']?>" <?php echo $pid==$row['id']?"selected":""?>><?php echo $row['xinfuxun']=="专项培训"?("-----"):"★"  ?><?php echo $row['shiqi'].$row['pname']?></option>
									<?php
								}
								?>
								<option value="all" <?php echo $pid=="all"?"selected":""?>>《查询全部班级》</option>
							</select>
							<?php if($pid!=-1){ ?>
								<a href="pxs/type/down/pid/{{$pid}}" target="_blank">下载详细表格</a>
							<?php }?>
                        </div>
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <table width="100%" class="table table-striped table-bordered table-hover" id="dataTables-example">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>照片</th>
                                        <th>姓名</th>
                                        <th>班级</th>
                                        <th>电话</th>
                                        <th>单位</th>
                                        <th>人员类型</th>
                                    </tr>
                                </thead>
                                <tbody>
                                	<?php
                                	$i=0;
                                	foreach($pxy as $row){$i++;
                                	?>
                                    <tr class="<?php echo $i%2==0?"even":"odd";?> gradeA ">
                                    	<td><?php echo $i;?></td>
                                    	<td><?php if(file_exists("uploader/xueyuanimg/".$row['idcard'].".jpg")){?><img src="uploader/xueyuanimg/<?php echo $row['idcard'];?>.jpg" width="50px;" height="60px;"><?php }else {echo '无';}?></td>
                                        <td><a href="syspxserch/puid/<?php echo $row['puid'];?>"><?php echo $row['puname'];?></a></td>
										<td><?php echo $row['pname'];?></td>
                                    	<td><?php echo $row['mphone'];?><a href="tel:<?php echo $row['mphone'];?>"><i class="fa fa-fw fa-phone"></i></a></td>
                                        <td><?php echo $row['workunit'];?></td>
                                        <td><?php echo $row['ptype'];?></td>
                                    </tr>
                                	<?php 
                                	}
                                	?>
                                </tbody>
                            </table>
                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
             </div>
        </div>
        <!-- /#page-wrapper -->
  </div>
        <!-- DataTables JavaScript -->
<?php require_once 'bottom.php';?>
    <script src="sb2/vendor/datatables/js/jquery.dataTables.js"></script>
    <script src="sb2/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
    <script src="sb2/vendor/datatables-responsive/dataTables.responsive.js"></script>
    <script>
    $(document).ready(function() {
        $('#dataTables-example').DataTable({
            responsive: true,
            "aaSorting": [[ 0, "desc" ]],
            "aLengthMenu": [ 200, 100, 50, 10 ]
        });
    });
	function search(){
		var pid=document.getElementById("pid").value;
		location.href="pxs/pid/"+pid;
	}
    </script>